<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>成功</title>
    <script>
        window.onload=function () {
            document.getElementsByTagName("span")[1].innerText=new Date().toLocaleString();
            function time() {
                document.getElementsByTagName("span")[1].innerText=new Date().toLocaleString();
            }
            setInterval(time,1000);
        }
    </script>
</head>
<body>
    <h1>登陆成功，<span th:text="${session.user.username}">用户名</span></h1>
    <h2>当前时间为：<span>7000/07/01</span></h2>
</body>
</html>